{include file="Public/header" title="后台主页"/}
<!-- 主容器 start -->
<div id="container" class="container-fluid">
    <div class="row-fluid">

        <!-- 左侧导航栏 start -->
        {include file="Public/sidebar"/}
        <!-- 左侧导航栏 end -->

        <!-- 主内容 start -->
        <div id="content" class="span10">
            <div id="jywrap">
                <div id="maincontent">
                    <div class="wrap">
                        <div class="infobox">
                            <h3>数据库信息</h3>
                            <div class="content">
                                <p>当前时间：<span id="now_time" style="color:#398439;"></span></p>

                                <p>新增学生数据信息：
                                <table class="table table-bordered table-striped center">
                                    <thead>
                                    <tr>
                                        <th>学号</th>
                                        <th>姓名</th>
                                        <th>性别</th>
                                        <th>民族</th>
                                        <th>出生日期</th>
                                        <th>专业</th>
                                        <th>班级</th>
                                        <th>入学时间</th>
                                        <th>高考成绩</th>
                                        <th>新增时间</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    {if condition="$new_student"}
                                    {foreach name="new_student" item="vo" }
                                    <tr>
                                        <td><a href="{:U('admin/student/edit','id=$vo.Id')}">{$vo.Id}</a></td>
                                        <td><a href="{:U('admin/student/edit','id=$vo.Id')}">{$vo.name}</a></td>
                                        <td>{$vo.sex}</td>
                                        <td>{$vo.nation}</td>
                                        <td class="datetime">{$vo.birthday}</td>
                                        <td>{:get_title('Major',$vo['major_id'])}</td>
                                        <td>{:get_title('Class',$vo['class_id'])}</td>
                                        <td class="datetime">{$vo.into_time}</td>
                                        <td>{$vo.gk_score}</td>
                                        <td class="datetime">{$vo.create_time}</td>
                                    </tr>
                                    {/foreach}
                                    {else/}
                                    <tr>
                                        <td colspan="13">暂无相关信息</td>
                                    </tr>
                                    {/if}
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- 主内容 end -->
        <script language="javascript">
            Date.prototype.Format = function (fmt) { //author: meizz
                var o = {
                    "M+": this.getMonth() + 1, //月份
                    "d+": this.getDate(), //日
                    "h+": this.getHours(), //小时
                    "m+": this.getMinutes(), //分
                    "s+": this.getSeconds(), //秒
                    "q+": Math.floor((this.getMonth() + 3) / 3), //季度
                    "S": this.getMilliseconds() //毫秒
                };
                if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
                for (var k in o)
                    if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
                return fmt;
            };
            setInterval(function(){
                $("#now_time").text(new Date().Format("yyyy-MM-dd hh:mm:ss"));
            },1000);
        </script>
    </div>
</div>
<!-- 主容器 end -->
{include file="Public/footer"/}